package cn.hx.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 新闻(News)实体类
 *
 * @author makejava
 * @since 2022-08-19 19:30:22
 */
public class News implements Serializable {

    private static final long serialVersionUID = -97227037687039871L;
    /**
     * 新闻id
     */
    private Integer id;
    /**
     * 作者id
     */
    private Integer userId;
    private UserInfo userInfo;

    /**
     * 新闻标题
     */
    private String title;
    /**
     * 新闻简介
     */
    private Integer newsDetailId;
    private NewsDetail newsDetail;

    /**
     * 新闻创建时间
     */
    private Date createTime;
    /**
     * 新闻修改时间
     */
    private Date updateTime;


    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public NewsDetail getNewsDetail() {
        return newsDetail;
    }

    public void setNewsDetail(NewsDetail newsDetail) {
        this.newsDetail = newsDetail;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getNewsDetailId() {
        return newsDetailId;
    }

    public void setNewsDetailId(Integer newsDetailId) {
        this.newsDetailId = newsDetailId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "News{" +
                "id=" + id +
                ", userId=" + userId +
                ", userInfo=" + userInfo +
                ", title='" + title + '\'' +
                ", newsDetailId=" + newsDetailId +
                ", newsDetail=" + newsDetail +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}